import { postRequest, postRequestList, postRequestData, postRequestJson } from '../utils/request'
export const getOrgList = <T>(data?: any): Promise<IResponseList<T>> => postRequestList(`/api/sop/sop/org/query`, data)

export const getOrgListDetail = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestData(`/api/sop/sop/org/list`, data)

export const getOrgListSearch = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestJson(`/api/sop/sop/org/listOrganizationByApp`, data)

export const addOrg = <T>(data?: any): Promise<IResponsePost<T>> => postRequest(`/api/sop/sop/org/create`, data)

export const editOrg = <T>(data?: any): Promise<IResponsePost<T>> => postRequest(`/api/sop/sop/org/edit`, data)

export const updateOrgStatus = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/org/updateStatus`, data)
